-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding documentation for Topology Aware Hints #27032
Adding documentation for Topology Aware Hints #27032
Conversation
Deploy preview for kubernetes-io-vnext-staging processing. Building with commit b9ec368 https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/6064f7b4d270fc0007f201ff |
/assign @PI-Victor |
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
87e4cef
to
e158206
Compare
|
||
## Constraints | ||
|
||
* Topology Aware Hints are not compatible with `internalTrafficPolicy=Local`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it invalid to spec eTP: Cluster
and iTP: Local
? I don't think that's disallowed? In that case, topology hints modulate the meaning of "Cluster", no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're completely right. There's a bug in the implementation that makes these exclusive, but that should not be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up: kubernetes/kubernetes#100313
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if my understanding is correct, before the fix for kubernetes/kubernetes#100313, it's not compatible with externalTrafficPolicy=Local
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks!
use both features in the same cluster on different Services, just not on the | ||
same Service. | ||
|
||
* This approach will not work well for Services that have a large proportion of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The APPROACH might, but the implementation will need to adapt to handle it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For an alpha feature, it's OK to document current shortcomings without making a commitment about future improvements to address them (we don't want to make promises unless we're sure of delivering on them).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is worth further discussion, but the only ways I can think to adapt to this would be new metrics that could enable feedback-based balancing or extra configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I meant is that the implementation could evolve to consider feedback and the hints
API would still be appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @robscott
Thanks for this PR.
The feature looks really useful, I can see myself wanting that next week actually.
This will need some changes before we can merge it I'm afraid. Any feedback I've marked as a nit is optional; the other stuff pretty much does need fixing though.
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
use both features in the same cluster on different Services, just not on the | ||
same Service. | ||
|
||
* This approach will not work well for Services that have a large proportion of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For an alpha feature, it's OK to document current shortcomings without making a commitment about future improvements to address them (we don't want to make promises unless we're sure of delivering on them).
3e49aff
to
f319635
Compare
Service Topology is deprecated as of Kubernetes v1.21, and will be removed in | ||
v1.22. Topology Aware Hints was introduced in Kubernetes v1.21 and provides | ||
similar functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to update https://kubernetes.io/docs/reference/using-api/deprecation-guide/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. I think that specific doc is focused on deprecations of API versions, not fields. I know we'll have a deprecation notice in the 1.21 release notes, but maybe we need something more visible in the docs?
/cc @liggitt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that page is currently focused on entirely deprecated API versions that require migration to another API version. Since v1beta1 EndpointSlices will stop being served in 1.25, and the v1 replacement is ready, they should be marked as deprecated, and added to that doc, along with a mention of the topology
field not being writeable in v1.
Hi @robscott , thank you for having your Doc PR ready for review, friendly reminder about the upcoming doc related dates for the 1.21 release:
|
@kubernetes/sig-network-pr-reviews how's this looking?
|
Hi @andrewsykim @bowei @dcbw @thockin @wojtek-t , since this documentation PR is related to SIG Network KEP 2433 Topology Aware Hints , as reviewers or approvers of the KEP please provide a technical review for this PR by March 31 to get this into the release. Thank you! |
As this is documenting an alpha feature, it's OK to have a few documentation rough edges. We do want:
I think that's the minimum. Obviously going beyond that is better and welcome. We will consider PRs against dev-1.21 even after the initial docs merge, and because this is website is continuously delivered, we'll also consider the TL;DR: So we don't need this PR to be completely finished feature docs, so long as the minimum is done well. |
BTW @robscott I do think this documentation is already good and well beyond the minimum, thanks for being so thorough! |
I think this PR is just waiting for technical signoff at this point. @thockin or @andrewsykim can you add a technical LGTM to this? |
content/en/docs/concepts/services-networking/service-topology.md
Outdated
Show resolved
Hide resolved
real-time feedback. It is still possible for individual endpoints to become | ||
overloaded. | ||
|
||
3. **One or more Nodes has insufficient information:** If any node does not have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true even when a single node may be missing topology labels for a short period of time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, during that short period of time, would kube-proxy flap between topolgoy-aware hints and all endpoints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is what is is for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the current approach is very quick to bail out. Would like to try to find some kind of acceptable threshold for missing data, but that's been hard to quantify so far.
## Using Topology Aware Hints | ||
|
||
You can enable Topology Aware Hints for a Service by setting the | ||
`service.kubernetes.io/topology-aware-hints` annotation to `auto`. This tells |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if this was covered in the PR review, I was unable to review it due to other priorities :(
Do we "drop annotations" like we do field when the feature gate is off, or is the annotation just ignored in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the annotation is a way for users to opt into this feature on a Service, so dropping that opt-in would not be good here.
content/en/docs/concepts/services-networking/service-topology.md
Outdated
Show resolved
Hide resolved
@robscott please review and address andrewsykim's comments. I also made a few suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good, some smaller comments
content/en/docs/concepts/services-networking/service-topology.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
## Using Topology Aware Hints | ||
|
||
You can enable Topology Aware Hints for a Service by setting the | ||
`service.kubernetes.io/topology-aware-hints` annotation to `auto`. This tells |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignored
## Using Topology Aware Hints | ||
|
||
You can enable Topology Aware Hints for a Service by setting the | ||
`service.kubernetes.io/topology-aware-hints` annotation to `auto`. This tells |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Auto" or "auto"? It should be "Auto" probably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it is "auto", should I try to fix that in upstream? https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/endpointslice/utils.go#L395
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, and now you get to handle both!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Covered by kubernetes/kubernetes#100728
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
real-time feedback. It is still possible for individual endpoints to become | ||
overloaded. | ||
|
||
3. **One or more Nodes has insufficient information:** If any node does not have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is what is is for now.
content/en/docs/tasks/administer-cluster/enabling-service-topology.md
Outdated
Show resolved
Hide resolved
/assign |
1f2f840
to
851610b
Compare
Thanks for the reviews @andrewsykim @thockin and @reylejano! This is ready for another round of review when you have time. |
content/en/docs/concepts/services-networking/topology-aware-hints.md
Outdated
Show resolved
Hide resolved
851610b
to
b9ec368
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 82c662891624c9cc186ea3775704212ecfd8028c
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: reylejano The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This adds documentation for the new Topology Aware Hints feature and also notes that Service Topology is deprecated.
/cc @andrewsykim @sftim
/sig network